Foxit PDF RDK
uiextensions.UIExtensionsManager Class Reference
Inheritance diagram for uiextensions.UIExtensionsManager:

Public Member Functions

 canAddAnnot ()
 
 canAssemble ()
 
 canModifyContents ()
 
 canUpdateAnnotDefaultProperties ()
 
 enableAutoFullScreen (enable)
 
 enableBottomToolbar (isEnabled)
 
 enableFormHighlight (enable)
 
 enableLinkHighlight (enable)
 
 enableLinks (enable)
 
 enableModification (isEnabled)
 
 enableSmallBottomToolbar (isEnabled)
 
 enableSmallTopToolbar (isEnabled)
 
 enableTopToolbar (isEnabled)
 
 exitPanZoomMode ()
 
 getAnnotAuthor ()
 
 getAnnotHandlerByType (type)
 
 getConfig ()
 
 getCurrentAnnotHandler ()
 
 getCurrentSelectedText ()
 
 getCurrentToolHandler ()
 
 getFormHighlightColor ()
 
 getLinkHighlightColor ()
 
 getModuleByName (name)
 
 getNightColorMode ()
 
 getPageColorMode ()
 
 getPanelManager ()
 
 getPDFViewCtrlModel ()
 
 getSaveDocFlag ()
 
 getSavePath ()
 
 getSaveWriter ()
 
 getSelectionHighlightColor ()
 
 getToolHandlerByType (type)
 
 isAutoSaveDoc ()
 
 isContinueAddAnnot ()
 
 isEnableModification ()
 
 isFormHighlightEnable ()
 
 isLinkHighlightEnabled ()
 
 isLinksEnabled ()
 
 isLoadAnnotModule (annot)
 
 isUseLogicalPageNumbers ()
 
 onBackPress ()
 
 onXFAPageRemoved (isSuccess, pageIndex)
 
 onXFAPagesInserted (isSuccess, pageIndex)
 
 onXFAWidgetAdded (xfaWidget)
 
 onXFAWidgetWillRemove (xfaWidget)
 
 openDocument (path, password, cb(errorCode);)
 
 registerAnnotHandler (handler)
 
 registerDocModifiedEventListener (listener)
 
 registerInteractionListener (listener)
 
 registerLifecycleListener (listener)
 
 registerMenuEventListener (listener)
 
 registerModule (module)
 
 registerStateChangeListener (listener)
 
 registerToolHandler (handler)
 
 registerToolHandlerChangedListener (listener)
 
 registerXFAPageEventListener (listener)
 
 registerXFAWidgetEventListener (listener)
 
 setAnnotAuthor (author)
 
 setAutoSaveDoc (autoSaveDoc)
 
 setContinueAddAnnot (continueAddAnnot)
 
 setCurrentToolHandler (toolHandler)
 
 setFilePath (path)
 
 setFormHighlightColor (color)
 
 setLinkHighlightColor (color)
 
 setNightColorMode (nightColorMode)
 
 setOnFinishListener (listener)
 
 setPageColorMode (pageColorMode)
 
 setSaveDocFlag (flag)
 
 setSavePath (savePath)
 
 setSaveWriter (writer)
 
 setSelectionHighlightColor (color)
 
 setUpdateAnnotDefaultProperties (update)
 
 setUseLogicalPageNumbers (useLogicalPageNumbers)
 
 triggerDismissMenuEvent ()
 
 unregisterAnnotHandler (handler)
 
 unregisterDocModifiedEventListener (listener)
 
 unregisterInteractionListener (listener)
 
 unregisterLifecycleListener (listener)
 
 unregisterMenuEventListener (listener)
 
 unregisterModule (module)
 
 unregisterStateChangeListener (listener)
 
 unregisterToolHandler (handler)
 
 unregisterToolHandlerChangedListener (listener)
 
 unregisterXFAPageEventListener (listener)
 
 unregisterXFAWidgetEventListener (listener)
 

Detailed Description

Class UIExtensionsManager represents a UI extensions manager.

The UIExtensionsManager class is mainly used for the UI extensions which implement IPDFReader interface, it implements the IPDFUIExtensionsManager interface that is a listener to listen common interaction events and view event, and will dispatch some events to UI extensions, it also defines functions to manage the UI extensions.

Member Function Documentation

◆ canAddAnnot()

uiextensions.UIExtensionsManager.canAddAnnot ( )

Check whether the document can add annotation

Returns
true means The document can add annotation

◆ canAssemble()

uiextensions.UIExtensionsManager.canAssemble ( )

Check whether the document can be assemble.

Returns
true means The document can be assemble

◆ canModifyContents()

uiextensions.UIExtensionsManager.canModifyContents ( )

Check whether the document can be modified.

Returns
true means The document can be modified

◆ canUpdateAnnotDefaultProperties()

uiextensions.UIExtensionsManager.canUpdateAnnotDefaultProperties ( )

Whether to update the default properties of creating annot.

Returns
True if you modify some properties of an annot, those properties will be used the next time when you create the same type of annot, false otherwise.

◆ enableAutoFullScreen()

uiextensions.UIExtensionsManager.enableAutoFullScreen ( enable  )

Set whether to automatically full screen, the default is true.

Parameters
enableIf you set true, it will automatically full screen after a few seconds, hiding topbar and bottommbar,false otherwise.

◆ enableBottomToolbar()

uiextensions.UIExtensionsManager.enableBottomToolbar ( isEnabled  )

Whether show the bottom tool bar

Parameters
isEnabledTrue show the bottom tool bar, or otherwise.

◆ enableFormHighlight()

uiextensions.UIExtensionsManager.enableFormHighlight ( enable  )

Enable the highlight color of form field. If the document is opened, please call function PDFViewCtrl#updatePagesLayout() after setting the new value.

Parameters
enableTrue means highlight color of form field. can be displayed, false for else.

◆ enableLinkHighlight()

uiextensions.UIExtensionsManager.enableLinkHighlight ( enable  )

Enable highlight color of link annotation

Parameters
enableTrue means highlight color of link annotation can be displayed, false for else.

◆ enableLinks()

uiextensions.UIExtensionsManager.enableLinks ( enable  )

Enable link annotation action event.

Parameters
enableTrue means link annotation action event can be triggered, false for else.

◆ enableModification()

uiextensions.UIExtensionsManager.enableModification ( isEnabled  )

Set whether the pdf document can be modified. The default is allow modification.

Parameters
isEnabledwhether the pdf document can be modified

◆ enableSmallBottomToolbar()

uiextensions.UIExtensionsManager.enableSmallBottomToolbar ( isEnabled  )

Enable or disable small bottom toolbar.

Parameters
isEnabledWhether small bottom toolbar is enabled or not.

◆ enableSmallTopToolbar()

uiextensions.UIExtensionsManager.enableSmallTopToolbar ( isEnabled  )

Enable or disable small top toolbar.

Parameters
isEnabledWhether small top toolbar is enabled or not.

◆ enableTopToolbar()

uiextensions.UIExtensionsManager.enableTopToolbar ( isEnabled  )

Whether show the top tool bar

Parameters
isEnabledTrue show the top tool bar, or otherwise.

◆ exitPanZoomMode()

uiextensions.UIExtensionsManager.exitPanZoomMode ( )

Exit the pan zoom mode.

◆ getAnnotAuthor()

uiextensions.UIExtensionsManager.getAnnotAuthor ( )

Get annotation author string. The default author is "foxit sdk"

Returns
Annotation author string

◆ getAnnotHandlerByType()

uiextensions.UIExtensionsManager.getAnnotHandlerByType ( type  )

Get the specified AnnotHandler from current UI extensions manager.

Parameters
typeThe type of AnnotHandler, refer to AnnotHandler#getType();
Returns
A AnnotHandler object with specified type.

◆ getConfig()

uiextensions.UIExtensionsManager.getConfig ( )

Get a property config

Returns
Config

◆ getCurrentAnnotHandler()

uiextensions.UIExtensionsManager.getCurrentAnnotHandler ( )
Returns
Get the current AnnotHandler

◆ getCurrentSelectedText()

uiextensions.UIExtensionsManager.getCurrentSelectedText ( )

Get current selected text content from text select tool handler.

Returns
The current selected text content.

◆ getCurrentToolHandler()

uiextensions.UIExtensionsManager.getCurrentToolHandler ( )

Get the current tool handler.

Returns
A ToolHandler object which specifies the current tool handler.

◆ getFormHighlightColor()

uiextensions.UIExtensionsManager.getFormHighlightColor ( )

Get the highlight color of form field.

Returns
the highlight color of form field.

◆ getLinkHighlightColor()

uiextensions.UIExtensionsManager.getLinkHighlightColor ( )

get the highlight color of link annotation.

Returns
the highlight color

◆ getModuleByName()

uiextensions.UIExtensionsManager.getModuleByName ( name  )

Get the specified module from current UI extensions manager.

Parameters
nameThe specified module name, refer to Module#getName().
Returns
A Module object with specified module name.

◆ getNightColorMode()

uiextensions.UIExtensionsManager.getNightColorMode ( )

Get the night color mode.

Returns
The NightColorMode night color mode. It would be one of NightColorMode.DEFAULT, NightColorMode.MAPPING_GRAY.

◆ getPageColorMode()

uiextensions.UIExtensionsManager.getPageColorMode ( )

◆ getPanelManager()

uiextensions.UIExtensionsManager.getPanelManager ( )

Get the interface to handle the creation, display, hiding, layout, and interaction of panels.

Returns
IPanelManager

◆ getPDFViewCtrlModel()

uiextensions.UIExtensionsManager.getPDFViewCtrlModel ( )

Receive and handle the single tap event.

Parameters
motionEventMotionEvent object which species the event.
Returns
true if the event is consumed, false otherwise.

◆ getSaveDocFlag()

uiextensions.UIExtensionsManager.getSaveDocFlag ( )

Get the flag while saving a document has used

◆ getSavePath()

uiextensions.UIExtensionsManager.getSavePath ( )
Returns
the path where the document is saved

◆ getSaveWriter()

uiextensions.UIExtensionsManager.getSaveWriter ( )
Returns
Get the file writer callback where the document will be saved.

◆ getSelectionHighlightColor()

uiextensions.UIExtensionsManager.getSelectionHighlightColor ( )

Get highlight color (including alpha) when text has selected.

Returns
The highlight color.

◆ getToolHandlerByType()

uiextensions.UIExtensionsManager.getToolHandlerByType ( type  )

get the specified ToolHandler from current UI extensions manager.

Parameters
typeThe tool handler type, refer to function ToolHandler#getType().
Returns
A ToolHandler object with specified type.

◆ isAutoSaveDoc()

uiextensions.UIExtensionsManager.isAutoSaveDoc ( )

Returns true if the document is automatically saved.

Returns
True if the document is automatically saved, false otherwise.

◆ isContinueAddAnnot()

uiextensions.UIExtensionsManager.isContinueAddAnnot ( )

Whether or not the annotation can be created continuously.

Returns
True the annotation can be created continuously or otherwise.

◆ isEnableModification()

uiextensions.UIExtensionsManager.isEnableModification ( )

whether the pdf document can be modified

Returns
whether the pdf document can be modified

◆ isFormHighlightEnable()

uiextensions.UIExtensionsManager.isFormHighlightEnable ( )

Check whether form highlight can be displayed.

Returns
True means form highlight can be displayed, false for else.

◆ isLinkHighlightEnabled()

uiextensions.UIExtensionsManager.isLinkHighlightEnabled ( )

Check whether link highlight can be display.

Returns
True means link highlight can be displayed, false for else.

◆ isLinksEnabled()

uiextensions.UIExtensionsManager.isLinksEnabled ( )

Check whether link annotation action event can be triggered.

Returns
True means link annotation action event can be triggered, false for else.

◆ isLoadAnnotModule()

uiextensions.UIExtensionsManager.isLoadAnnotModule ( annot  )

Check whether the specified annotation module that is loaded.

◆ isUseLogicalPageNumbers()

uiextensions.UIExtensionsManager.isUseLogicalPageNumbers ( )

Whether to use logical pages.

Returns
True means use logical page numbers, false for else.

◆ onBackPress()

uiextensions.UIExtensionsManager.onBackPress ( )

Handles the back button press event.

Returns
{boolean} Always returns true, indicating that the back press event is handled.

◆ onXFAPageRemoved()

uiextensions.UIExtensionsManager.onXFAPageRemoved ( isSuccess  ,
pageIndex   
)

Called when the specified xfa page has removed.

◆ onXFAPagesInserted()

uiextensions.UIExtensionsManager.onXFAPagesInserted ( isSuccess  ,
pageIndex   
)

Called when a xfa page has added in the specified position.

◆ onXFAWidgetAdded()

uiextensions.UIExtensionsManager.onXFAWidgetAdded ( xfaWidget  )

Called when a XFAWidget has added.

◆ onXFAWidgetWillRemove()

uiextensions.UIExtensionsManager.onXFAWidgetWillRemove ( xfaWidget  )

Called when a XFAWidget will be removed.

◆ openDocument()

uiextensions.UIExtensionsManager.openDocument ( path  ,
password  ,
cb(errorCode);   
)

Open a PDF document from a specified PDF file path.

Parameters
pathA PDF file path.
passwordA byte array which specifies the password used to load the PDF document content. It can be either user password or owner password. If the PDF document is not encrypted by password, just pass an empty string.
cbThe callback will be called when current document object becomes available or the view control fail to open the document FoxitRDKNative.ErrorCode.

◆ registerAnnotHandler()

uiextensions.UIExtensionsManager.registerAnnotHandler ( handler  )

Register the specified AnnotHandler to current UI extensions manager.

Parameters
handlerA AnnotHandler to use.

◆ registerDocModifiedEventListener()

uiextensions.UIExtensionsManager.registerDocModifiedEventListener ( listener  )

Register a document modified event listener.

Parameters
listenerAn IDocModifiedEventListener object to be registered.

◆ registerInteractionListener()

uiextensions.UIExtensionsManager.registerInteractionListener ( listener  )

Register a callback to be invoked when the interaction event happened.

Parameters
listenerthe interaction event IInteractionEventListener

◆ registerLifecycleListener()

uiextensions.UIExtensionsManager.registerLifecycleListener ( listener  )

Register the specified ILifecycleEventListener

◆ registerMenuEventListener()

uiextensions.UIExtensionsManager.registerMenuEventListener ( listener  )

Register a callback to be invoked when the menu event has triggered.

◆ registerModule()

uiextensions.UIExtensionsManager.registerModule ( module  )

Register the specified module to current UI extensions manager.

Note: This method is only used within RDK

Parameters
moduleA Module object to be registered.

◆ registerStateChangeListener()

uiextensions.UIExtensionsManager.registerStateChangeListener ( listener  )

Register the specified IStateChangeListener

◆ registerToolHandler()

uiextensions.UIExtensionsManager.registerToolHandler ( handler  )

Register the specified ToolHandler to current UI extensions manager.

Parameters
handlerA ToolHandler object to be registered.

◆ registerToolHandlerChangedListener()

uiextensions.UIExtensionsManager.registerToolHandlerChangedListener ( listener  )

Register a callback to be invoked when the tool handler changed.

Note: This method is only used within RDK

◆ registerXFAPageEventListener()

uiextensions.UIExtensionsManager.registerXFAPageEventListener ( listener  )

Register a xfa page event listener.

Parameters
listenerAn IPageEventListener object to be registered.

◆ registerXFAWidgetEventListener()

uiextensions.UIExtensionsManager.registerXFAWidgetEventListener ( listener  )

Register a xfa widget event listener.

Parameters
listenerAn IXFAWidgetEventListener object to be registered.

◆ setAnnotAuthor()

uiextensions.UIExtensionsManager.setAnnotAuthor ( author  )

Set annotation author

Parameters
authorthe author string to be set

◆ setAutoSaveDoc()

uiextensions.UIExtensionsManager.setAutoSaveDoc ( autoSaveDoc  )

Set to automatically save the document to the original file

Parameters
autoSaveDocTrue auto save document, false otherwise.

◆ setContinueAddAnnot()

uiextensions.UIExtensionsManager.setContinueAddAnnot ( continueAddAnnot  )

Set whether the annotation can be created continuously. The default is false.

Parameters
continueAddAnnotwhether the annot can be created continuously.

◆ setCurrentToolHandler()

uiextensions.UIExtensionsManager.setCurrentToolHandler ( toolHandler  )

Set the current tool handler.

Parameters
toolHandlerA ToolHandler object which specifies the current tool handler.

◆ setFilePath()

uiextensions.UIExtensionsManager.setFilePath ( path  )

Set the file path

◆ setFormHighlightColor()

uiextensions.UIExtensionsManager.setFormHighlightColor ( color  )

Set form highlight color. If the document is opened, please call function PDFViewCtrl#updatePagesLayout() after setting the new value.

Parameters
colorthe form highlight color to be set

◆ setLinkHighlightColor()

uiextensions.UIExtensionsManager.setLinkHighlightColor ( color  )

Set the highlight color of link annotation.

Parameters
colorthe highlight color to be set

◆ setNightColorMode()

uiextensions.UIExtensionsManager.setNightColorMode ( nightColorMode  )

Set the night color mode.

Parameters
nightColorModeThe night color mode. It should be one of NightColorMode.DEFAULT, NightColorMode.MAPPING_GRAY.

◆ setOnFinishListener()

uiextensions.UIExtensionsManager.setOnFinishListener ( listener  )

Set the OnFinishListener to be invoked when the document closed and current activity has exited.

Parameters
listenerthe OnFinishListener to use.

◆ setPageColorMode()

uiextensions.UIExtensionsManager.setPageColorMode ( pageColorMode  )

Set the page color mode.

Parameters
pageColorModeThe page color mode. It should be one of NightColorMode.DEFAULT, NightColorMode.MAPPING_GRAY.

◆ setSaveDocFlag()

uiextensions.UIExtensionsManager.setSaveDocFlag ( flag  )

Set the flag to be used when the document has saved

◆ setSavePath()

uiextensions.UIExtensionsManager.setSavePath ( savePath  )

Set the path where the document will be saved

◆ setSaveWriter()

uiextensions.UIExtensionsManager.setSaveWriter ( writer  )

set the file writer callback where the document will be saved.

Parameters
writerFile writer callbackFileWriterCallback for the new saved PDF file.

◆ setSelectionHighlightColor()

uiextensions.UIExtensionsManager.setSelectionHighlightColor ( color  )

Set highlight color (including alpha) when select text.

Parameters
colorThe highlight color to be set.

◆ setUpdateAnnotDefaultProperties()

uiextensions.UIExtensionsManager.setUpdateAnnotDefaultProperties ( update  )

Set whether to update the default properties of creating annot.

Parameters
updateTrue if you modify some properties of an annot, those properties will be used the next time when you create the same type of annot, false otherwise.

◆ setUseLogicalPageNumbers()

uiextensions.UIExtensionsManager.setUseLogicalPageNumbers ( useLogicalPageNumbers  )

Whether to use logical pages, default is false.

Parameters
useLogicalPageNumbersTrue means use logical page numbers, false for else.

◆ triggerDismissMenuEvent()

uiextensions.UIExtensionsManager.triggerDismissMenuEvent ( )

Called when menu has dismissed.

◆ unregisterAnnotHandler()

uiextensions.UIExtensionsManager.unregisterAnnotHandler ( handler  )

Unregister the specified AnnotHandler from current UI extensions manager.

Parameters
handlerA AnnotHandler to use.

◆ unregisterDocModifiedEventListener()

uiextensions.UIExtensionsManager.unregisterDocModifiedEventListener ( listener  )

Unregister a document modified event listener.

Parameters
listenerAn IDocModifiedEventListener object to be unregistered.

◆ unregisterInteractionListener()

uiextensions.UIExtensionsManager.unregisterInteractionListener ( listener  )

Unregister the interaction event listener.

Parameters
listenerthe interaction event IInteractionEventListener

◆ unregisterLifecycleListener()

uiextensions.UIExtensionsManager.unregisterLifecycleListener ( listener  )

Unregister the specified ILifecycleEventListener

◆ unregisterMenuEventListener()

uiextensions.UIExtensionsManager.unregisterMenuEventListener ( listener  )

Unregister the specified MenuEventListener

◆ unregisterModule()

uiextensions.UIExtensionsManager.unregisterModule ( module  )

Unregister the specified module from current UI extensions manager. Note: This method is only used within RDK

Parameters
moduleA Module object to be unregistered.

◆ unregisterStateChangeListener()

uiextensions.UIExtensionsManager.unregisterStateChangeListener ( listener  )

Unregister the specified IStateChangeListener

◆ unregisterToolHandler()

uiextensions.UIExtensionsManager.unregisterToolHandler ( handler  )

Unregister the specified ToolHandler from current UI extensions manager.

Note: This method is only used within RDK

Parameters
handlerA ToolHandler object to be unregistered.

◆ unregisterToolHandlerChangedListener()

uiextensions.UIExtensionsManager.unregisterToolHandlerChangedListener ( listener  )

Unregister the ToolHandler changed listener.

Note: This method is only used within RDK

Parameters
listenera ToolHandlerChangedListener to use.

◆ unregisterXFAPageEventListener()

uiextensions.UIExtensionsManager.unregisterXFAPageEventListener ( listener  )

Unregister a xfa page event listener.

Parameters
listenerAn IPageEventListener object to be unregistered.

◆ unregisterXFAWidgetEventListener()

uiextensions.UIExtensionsManager.unregisterXFAWidgetEventListener ( listener  )

Unregister a xfa widget event listener.

Parameters
listenerAn IXFAWidgetEventListener object to be unregistered.